@echo off
set ACTUALDIR=%~dp0
set CALLDIR=%ACTUALDIR%
echo %CALLDIR%
for %%i in ("%CALLDIR%") do set %CALLDIR%=%%~fsi  
call  "%CALLDIR%/SetEnv.cmd"
::me aseguro de que el directorio sea donde esta la aplicacion
cd %CALLDIR%
echo ==================================
echo =          Send Mail             =
echo =              by Otto Abreu     =
echo ==================================
echo.
echo.
echo work directory: %ACTUALDIR%
echo library directory: %LIBDIR%
set CLASSPATH=%CLASSPATH%%CP_SENDMAIL%
echo Classpath:
echo
echo
echo
echo
echo %CLASSPATH%
echo
echo
echo
call :getargc argc %*
:getargc
    set getargc_v0=%1
    set /a "%getargc_v0% = 0"
java  com.google.code.ojar.sendtemplatemail.console.exec.SendMailMain %*
echo  RETURNS: %errorlevel%
pause
exit /b %errorlevel%


